import { createRouter, createWebHashHistory } from 'vue-router'
// import NotFound from '@/views/NotFound.vue'

const routes = [
  // {
  //   path: '/',
  //   name: 'Home',
  //   redirect: '/content'
  // },
  {
    path: '/',
    name: 'login',
    component: () =>
      import(/* webpackChunkName: "login" */ '../views/login/Login.vue'),
  },
  {
    path: '/NavBar',
    name: 'NavBar',
    component: () =>
      import(
        /* webpackChunkName: "NavBar" */ '../components/Layout/NavBar.vue'
      ),
    children: [
      {
        path: '/content',
        name: 'content',
        component: () =>
          import(
            /* webpackChunkName: "content" */ '../views/content/Content.vue'
          ),
      },
      {
        path: '/userInfo',
        name: 'userInfo',
        component: () =>
          import(
            /* webpackChunkName: "userInfo" */ '../views/userInfo/userInfo.vue'
          ),
      },
    ],
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: () =>
      import(/* webpackChunkName: "userInfo" */ '../views/NotFound.vue'),
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router
